﻿using System;
using fastCSharp.code.cSharp;

namespace diantou.web.ajax.admin
{
    /// <summary>
    /// 管理员权限调用
    /// </summary>
    abstract class adminHandle<callType> : permissionHandle<callType>
        where callType : adminHandle<callType> 
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        protected override bool loadHeader()
        {
            if (base.loadHeader())
            {
                if (sessionUser.Permission == dataModel.user.permission.Admin) return true;
                AjaxResponse(new fastCSharp.code.cSharp.webView.errorPath { ErrorPath = currentUser.Path.NewFocus });
            }
            return false;
        }
    }
}
